﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Callchecker
{
    public partial class FormShowDetails : Form
    {
        public static FormShowDetails Item(DateTime dt, string msg, string Details)
        {
            FormShowDetails sd = new FormShowDetails();
            sd.tbTime.Text = dt.ToString();
            sd.tbMsg.Text = msg;
            sd.tbDetails.Text = Details;

            return sd;
        }

        private FormShowDetails()
        {
            InitializeComponent();
        }
        private void ShowDetails_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.F1)
            { 
                FormShowDetails_HelpButtonClicked(null, null);
                return;
            }
            
            if (e.KeyCode == Keys.Escape)
            {
                this.Close();
                return;
            }
        }
        private void FormShowDetails_HelpButtonClicked(object sender, CancelEventArgs e)
        {
            try
            {
                Common.GetHelp("mf_details", HelpNavigator.Topic);
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
    }
}
